<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title></title>
	<link rel="stylesheet" type="text/css" href="../../css/bootstrap.min.css"/>
	<link rel="stylesheet" type="text/css" href="../../css/common.css"/>
	<script src="../../js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div class="container">
	<div class="row clearfix">
		<div class="col-md-12 column">
			<div class="jumbotron">
				<h1>
					My Blog
				</h1>
				<p>
					The Blog built in PHP. 
				</p>
			
			</div>
			<nav class="navbar navbar-default navbar-inverse" role="navigation">
				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">
						<li>
							 <a href="./index.php">首页</a>
						</li>
						<li>
							 <a href="./catlist.php">栏目列表</a>
						</li>
						<li>
							 <a href="./catadd.php">增加栏目</a>
						</li>
						<li>
							 <a href="./artlist.php">文章列表</a>
						</li>
						<li>
							 <a href="./artadd.php">增加文章</a>
						</li>
						<li>
							 <a href="./commlist.php">评论列表</a>
						</li>
					</ul>
				</div>
			</nav>
		</div>
	</div>
	<div class="row clearfix">
		<div class="col-md-8 column">
			
			<?php foreach($arts as $a) {?>
			<div class="col-md-12" style="margin-bottom: 25px;">
				<h2><a href="art.php?art_id=<?php echo $a['art_id']; ?>"><?php echo $a['title']; ?></a> </h2>
				<p style="margin-bottom: 10px;">
					<span>时间：<?php echo date('Y/m/d',$a['pubtime']); ?></span>
					<span style="margin-left: 20px;">所属栏目：<?php echo $a['catname']; ?></span>
					<span style="margin-left: 20px;">评论数：<?php echo $a['comm']; ?></span>
				</p>
				<p><?php echo $a['content']; ?></p>
			</div>
			<?php }?>
			
			
			
			<ul class="pagination">

				<?php foreach($page as $k=>$v) {?>
					<?php if($k == $curr) {?>
					<li><a style="color: #333;background: #eee;" href="javascript:void(0);"><?php echo $k;} else {?></a></li>
					<li><a href="index.php?<?php echo $v; ?>"><?php echo $k; ?></a></li>
					<?php }?>
				<?php }?>

			</ul>
			
		</div>
		<div class="col-md-4 column">
			<div class="col-md-12" style="padding-bottom: 25px;">
				<div class="form-group">
					<div class="col-sm-10"><input type="email" class="form-control" /></div>
					<button class="btn btn-primary pull-right">搜索</button>
				</div>
			</div>
			
			<div class="col-md-12">
				<div class="aside">
					<h4>栏目列表</h4>
					<ul>
						<?php foreach($cats as $c) {?>
						<li><a href="index.php?cat_id=<?php echo $c['cat_id']; ?>"><?php echo $c['catname']; ?></a></li>
						<?php }?>
					</ul>
				</div>
				
				<div class="aside">
					<h4>文章管理</h4>
					<ul>
						<li><a href="">文章列表</a></li>
						<li><a href="">发布文章</a></li>
					</ul>
				</div>
				<div class="aside">
					<h4>个人中心</h4>
					<ul>
						<li><a href="">栏目列表</a></li>
						<li><a href="">添加栏目</a></li>
					</ul>
				</div>
			</div>

		</div>
	</div>
</div>
</body>
</html>